#include "qthreadrun.h"

QThreadRun::QThreadRun()
{
    startFlag = false;
}

QThreadRun::~QThreadRun()
{

}

void QThreadRun::setSwitch(bool flag)
{
    startFlag = flag;
}

void QThreadRun::run()
{
    while(startFlag)
    {
        qDebug()<<"QThreadRun子线程号:"<<QThread::currentThread();
        QThread::msleep(1000);   //延时1000ms
    }
}
